﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Browser;
using Jzy.Workflow.Code;

namespace Jzy.Workflow.Status
{
    public partial class Page : UserControl
    {
        private string FlowID
        {
            get
            {
                return HtmlPage.Document.QueryString["FlowID"];
            }
        }

        private string TaskID
        {
            get
            {
                if (HtmlPage.Document.QueryString.ContainsKey("TaskID"))
                {
                    return HtmlPage.Document.QueryString["TaskID"];
                }
                else
                {
                    return null;
                }
            }
        }

        public Page()
        {
            InitializeComponent();
            Display();
        }

        private void Display()
        {
            try
            {
                Flow flow = new Flow(int.Parse(FlowID), flowCanvas);
                flow.Init(TaskID);

            }
            catch (Exception ex)
            {
                MessageBox.Show("错误：" + ex.Message);
            }
        }
    }
}
